import { request } from '@pkg/request/src';

export enum UserGoodsApi {
  page = '/userGoods/page',
  sendMessage = '/userGoods/sendMessage',
  changeRefundState = '/userGoods/changeRefundState',
}

/**
 * 发送消息
 * @param params
 */
export const sendMessage = params =>
  request.post(
    {
      url: UserGoodsApi.sendMessage,
      params: params,
    },
    { errorMessageMode: 'none' },
  );

/**
 * 标记退款
 * @param params
 */
export const changeRefundState = params =>
  request.post(
    {
      url: UserGoodsApi.changeRefundState,
      params: params,
    },
    { errorMessageMode: 'message', successMessageMode: 'success' },
  );
